package com.tvunetworks.center.device.service;

import com.tvunetworks.center.common.model.LoginUser;
import com.tvunetworks.center.common.model.param.GetIdleChannelParam;
import com.tvunetworks.center.device.model.param.CustomizedLiveParam;
import com.tvunetworks.center.gs.model.Device;
/**
 * @program: tvucc-instance
 * @author lebronchen
 * @create: 2019-02-28 16:53
 **/
public interface CustomizedLiveService {
    /**
     * 手动通道 startLive
     * @param loginUser loginUser
     * @param param param
     */
    void manualStartLive(LoginUser loginUser, CustomizedLiveParam param);

    /**
     * 自动通道 startLive
     * @param loginUser loginUser
     * @param param param
     * @return String
     */
    String autoStartLive(LoginUser loginUser, CustomizedLiveParam param);

    /**
     * 关闭直播
     * @param loginUser loginUser
     * @param param  param
     */
    void stopLive(LoginUser loginUser, CustomizedLiveParam param);

    /**
     * 获取可用通道
     * @param param param
     * @return Device
     */
    Device getIdleChannel(GetIdleChannelParam param);

    /**
     * 检查设备在用户下是否 空闲
      * @param userId userId
     * @param rid rid
     * @return boolean
     */
    boolean isChannelIdle(String userId, String rid);
}
